package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.annotation.Transactional;
import redis.clients.jedis.Transaction;

import javax.swing.tree.TreeNode;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author: zhangrongqing
 * @Date: 2019/12/18 15:42
 */
public class TranactionalDemo {

//    @Transactional(value = TransactionDefinition.)

    public static void main(String[] args) {
        Map<Object,Object> hashMap = new HashMap<>();

        hashMap.put("123","123");


        Map<TreeNode,Object> hash = new HashMap<>();
        hash.put(new abc(),"123");

    }
}

class abc implements TreeNode{

    @Override
    public TreeNode getChildAt(int childIndex) {
        return null;
    }

    @Override
    public int getChildCount() {
        return 0;
    }

    @Override
    public TreeNode getParent() {
        return null;
    }

    @Override
    public int getIndex(TreeNode node) {
        return 0;
    }

    @Override
    public boolean getAllowsChildren() {
        return false;
    }

    @Override
    public boolean isLeaf() {
        return false;
    }

    @Override
    public Enumeration children() {
        return null;
    }
}
